/**
 * Description:
 * Class Name:charpter5_subject4
 * Date:2022/1/25 20:44
 *
 * @author LTisme
 * @version JAVA17
 */
package 疯狂Java讲义.第5章_面向对象_上.课后练习;

class vehicle{
    String name;
    String engine_brand;
    String manufacturer;
    String deep_attr;

    {
        deep_attr = "machine";
    }
    public vehicle(String name, String engine_brand, String manufacturer){
        this.name = name;
        this.engine_brand = engine_brand;
        this.manufacturer = manufacturer;
    }
}

class car extends vehicle{
    public car(String name, String engine_brand, String manufacturer){
        super(name, engine_brand, manufacturer);
    }
}

class train extends vehicle{
    public train(String name, String engine_brand, String manufacturer){
        super(name, engine_brand, manufacturer);
    }
}

class aeroplane extends vehicle{
    public aeroplane(String name, String engine_brand, String manufacturer){
        super(name, engine_brand, manufacturer);
    }
}

public class charpter5_subject5 {
    public static void main(String[] args) {
        var new_car = new car("车", "1", "USA");
        System.out.println(new_car.deep_attr);
    }
}
